class Order {
  final String orderNumber;
  final String address;
  final DateTime createTime;
  final double? latitude;
  final double? longitude;

  Order({
    required this.orderNumber,
    required this.address,
    required this.createTime,
    this.latitude,
    this.longitude,
  });

  Map<String, dynamic> toJson() {
    return {
      'orderNumber': orderNumber,
      'address': address,
      'createTime': createTime.toIso8601String(),
      'latitude': latitude,
      'longitude': longitude,
    };
  }

  factory Order.fromJson(Map<String, dynamic> json) {
    return Order(
      orderNumber: json['orderNumber'],
      address: json['address'],
      createTime: DateTime.parse(json['createTime']),
      latitude: json['latitude'],
      longitude: json['longitude'],
    );
  }
} 